package Frames;

import Beans.Funcionario;
import Beans.Pessoa;
import DataBase.FuncDAO;
import DataBase.PessoaDAO;
import java.awt.event.KeyEvent;
import java.util.List;
import java.util.Vector;
import javax.swing.JOptionPane;
import javax.swing.table.DefaultTableModel;

/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/*
 * Tela_Empresa.java
 *
 * Created on 07/07/2011, 20:02:27
 */
/**
 *besteira
 * @author monitor
 */
public class Tela_Funcionario extends javax.swing.JFrame {
   
    
    Funcionario f = null;
    Pessoa p = null;
    /** Creates new form Tela_Empresa */
    public Tela_Funcionario() {
        initComponents();
      f = new Funcionario();
      p = new Pessoa();
      p.setLoad(false);
    }
   
     
   ;
    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        jTabbedPane1 = new javax.swing.JTabbedPane();
        jPanel1 = new javax.swing.JPanel();
        jPanel5 = new javax.swing.JPanel();
        jLabel2 = new javax.swing.JLabel();
        txtNome = new javax.swing.JTextField();
        jLabel3 = new javax.swing.JLabel();
        jLabel4 = new javax.swing.JLabel();
        jPanel6 = new javax.swing.JPanel();
        brnCadastrar = new javax.swing.JButton();
        btnLimpar = new javax.swing.JButton();
        txtUsuario = new javax.swing.JTextField();
        jLabel1 = new javax.swing.JLabel();
        jLabel12 = new javax.swing.JLabel();
        JcomboNivel = new javax.swing.JComboBox();
        txtSenha = new javax.swing.JPasswordField();
        txtSenhaConfirm = new javax.swing.JPasswordField();
        jLabel15 = new javax.swing.JLabel();
        txtCpf = new javax.swing.JTextField();
        jLabel10 = new javax.swing.JLabel();
        jLabel13 = new javax.swing.JLabel();
        txtTel2 = new javax.swing.JTextField();
        txtTel1 = new javax.swing.JTextField();
        txtEndereco = new javax.swing.JTextField();
        jLabel18 = new javax.swing.JLabel();
        jButton2 = new javax.swing.JButton();
        jPanel2 = new javax.swing.JPanel();
        jPanel7 = new javax.swing.JPanel();
        jLabel5 = new javax.swing.JLabel();
        btnPesquisa = new javax.swing.JButton();
        btnListar = new javax.swing.JButton();
        jPanel8 = new javax.swing.JPanel();
        jScrollPane1 = new javax.swing.JScrollPane();
        tblPesquisaCons = new javax.swing.JTable();
        txtPesquisa = new javax.swing.JTextField();
        jPanel3 = new javax.swing.JPanel();
        jPanel9 = new javax.swing.JPanel();
        jLabel6 = new javax.swing.JLabel();
        txtExcluirFunc = new javax.swing.JTextField();
        bt_exc = new javax.swing.JButton();
        btnExPescuisar = new javax.swing.JButton();
        jPanel10 = new javax.swing.JPanel();
        jScrollPane2 = new javax.swing.JScrollPane();
        tblPesquisaExc = new javax.swing.JTable();
        jPanel4 = new javax.swing.JPanel();
        jPanel11 = new javax.swing.JPanel();
        jLabel7 = new javax.swing.JLabel();
        txtPesquisaAlterar = new javax.swing.JTextField();
        jPanel12 = new javax.swing.JPanel();
        jLabel9 = new javax.swing.JLabel();
        txtUsuarioAlterar = new javax.swing.JTextField();
        jLabel16 = new javax.swing.JLabel();
        jLabel17 = new javax.swing.JLabel();
        txtFone1Alterar = new javax.swing.JTextField();
        txtFone2Alterar = new javax.swing.JTextField();
        txtEnderecoAlterar = new javax.swing.JTextField();
        jLabel11 = new javax.swing.JLabel();
        JcomboNivelAlterar = new javax.swing.JComboBox();
        jLabel14 = new javax.swing.JLabel();
        txtNomeAlterar = new javax.swing.JTextField();
        jLabel8 = new javax.swing.JLabel();
        jComboBoxStatus = new javax.swing.JComboBox();
        jLabel19 = new javax.swing.JLabel();
        jPanel13 = new javax.swing.JPanel();
        btnAlterar = new javax.swing.JButton();
        bt_alt_limp = new javax.swing.JButton();
        btnPesquisaAlterar = new javax.swing.JButton();

        setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
        setName("tela_empresa"); // NOI18N
        getContentPane().setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout());

        jPanel5.setBorder(new javax.swing.border.LineBorder(new java.awt.Color(0, 0, 255), 2, true));

        jLabel2.setText("Nome:");

        jLabel3.setText("Conf Senha:");

        jLabel4.setText("Usuário:");

        jPanel6.setBorder(new javax.swing.border.LineBorder(new java.awt.Color(0, 0, 204), 1, true));

        brnCadastrar.setText("Cadastrar");
        brnCadastrar.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                brnCadastrarActionPerformed(evt);
            }
        });

        btnLimpar.setText("Limpar");
        btnLimpar.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnLimparActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout jPanel6Layout = new javax.swing.GroupLayout(jPanel6);
        jPanel6.setLayout(jPanel6Layout);
        jPanel6Layout.setHorizontalGroup(
            jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel6Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
                    .addComponent(btnLimpar, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(brnCadastrar, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                .addContainerGap(18, Short.MAX_VALUE))
        );
        jPanel6Layout.setVerticalGroup(
            jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel6Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(brnCadastrar)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(btnLimpar)
                .addContainerGap(15, Short.MAX_VALUE))
        );

        jLabel1.setText("Senha:");

        jLabel12.setText("Nível:");

        JcomboNivel.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "","Atendente", "Cumin", "Cozinheiro", "Entregador", "Garcom", "Gerente" }));
        JcomboNivel.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                JcomboNivelActionPerformed(evt);
            }
        });

        jLabel15.setText("CPF:");

        try{
            javax.swing.text.MaskFormatter format_textField = new javax.swing.text.MaskFormatter("###########");

            format_textField.setValidCharacters
            ("0123456789");
            txtCpf   = new javax.swing.JFormattedTextField(format_textField);
        }catch(Exception ex ){}
        txtCpf.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                txtCpfActionPerformed(evt);
            }
        });
        txtCpf.addKeyListener(new java.awt.event.KeyAdapter() {
            public void keyPressed(java.awt.event.KeyEvent evt) {
                txtCpfKeyPressed(evt);
            }
        });

        jLabel10.setText("Fone 1:");

        jLabel13.setText("Fone 2:");

        try{
            javax.swing.text.MaskFormatter format_textField = new javax.swing.text.MaskFormatter("########");

            format_textField.setValidCharacters
            ("0123456789");
            txtTel2   = new javax.swing.JFormattedTextField(format_textField);
        }catch(Exception ex ){}

        try{
            javax.swing.text.MaskFormatter format_textField = new javax.swing.text.MaskFormatter("########");

            format_textField.setValidCharacters
            ("0123456789");
            txtTel1   = new javax.swing.JFormattedTextField(format_textField);
        }catch(Exception ex ){}

        jLabel18.setText("Endereco:");

        jButton2.setText("Verificar");
        jButton2.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton2ActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout jPanel5Layout = new javax.swing.GroupLayout(jPanel5);
        jPanel5.setLayout(jPanel5Layout);
        jPanel5Layout.setHorizontalGroup(
            jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel5Layout.createSequentialGroup()
                .addGap(8, 8, 8)
                .addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jLabel18)
                    .addComponent(jLabel2)
                    .addComponent(jLabel15))
                .addGap(41, 41, 41)
                .addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                    .addComponent(txtCpf)
                    .addComponent(txtNome)
                    .addComponent(txtEndereco, javax.swing.GroupLayout.DEFAULT_SIZE, 159, Short.MAX_VALUE))
                .addGap(21, 21, 21)
                .addComponent(jButton2)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 100, Short.MAX_VALUE)
                .addComponent(jPanel6, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(35, 35, 35))
            .addGroup(jPanel5Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                    .addGroup(jPanel5Layout.createSequentialGroup()
                        .addComponent(jLabel4)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                        .addComponent(txtUsuario, javax.swing.GroupLayout.PREFERRED_SIZE, 90, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGroup(jPanel5Layout.createSequentialGroup()
                        .addComponent(jLabel1)
                        .addGap(56, 56, 56)
                        .addComponent(txtSenha, javax.swing.GroupLayout.PREFERRED_SIZE, 90, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGroup(jPanel5Layout.createSequentialGroup()
                        .addComponent(jLabel3)
                        .addGap(30, 30, 30)
                        .addComponent(txtSenhaConfirm, javax.swing.GroupLayout.PREFERRED_SIZE, 90, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGroup(jPanel5Layout.createSequentialGroup()
                        .addComponent(jLabel10)
                        .addGap(53, 53, 53)
                        .addComponent(txtTel1))
                    .addGroup(jPanel5Layout.createSequentialGroup()
                        .addComponent(jLabel13)
                        .addGap(53, 53, 53)
                        .addComponent(txtTel2)))
                .addContainerGap(405, Short.MAX_VALUE))
            .addGroup(jPanel5Layout.createSequentialGroup()
                .addGap(8, 8, 8)
                .addComponent(jLabel12)
                .addGap(13, 13, 13)
                .addComponent(JcomboNivel, javax.swing.GroupLayout.PREFERRED_SIZE, 83, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(464, Short.MAX_VALUE))
        );
        jPanel5Layout.setVerticalGroup(
            jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel5Layout.createSequentialGroup()
                .addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel5Layout.createSequentialGroup()
                        .addGap(8, 8, 8)
                        .addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(jLabel15)
                            .addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                                .addComponent(jButton2)
                                .addComponent(txtCpf, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
                        .addGap(3, 3, 3)
                        .addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(jPanel5Layout.createSequentialGroup()
                                .addGap(7, 7, 7)
                                .addComponent(jLabel2))
                            .addComponent(txtNome, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addGap(9, 9, 9)
                        .addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(txtEndereco, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(jLabel18))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(jLabel4)
                            .addComponent(txtUsuario, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addGap(10, 10, 10)
                        .addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(jLabel1)
                            .addComponent(txtSenha, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addGap(10, 10, 10)
                        .addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(jLabel3)
                            .addComponent(txtSenhaConfirm, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addGap(10, 10, 10)
                        .addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(jLabel10)
                            .addComponent(txtTel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addGap(10, 10, 10)
                        .addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(jLabel13)
                            .addComponent(txtTel2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addGap(35, 35, 35)
                        .addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(JcomboNivel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(jLabel12)))
                    .addGroup(jPanel5Layout.createSequentialGroup()
                        .addGap(19, 19, 19)
                        .addComponent(jPanel6, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
        jPanel1.setLayout(jPanel1Layout);
        jPanel1Layout.setHorizontalGroup(
            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel1Layout.createSequentialGroup()
                .addGap(20, 20, 20)
                .addComponent(jPanel5, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(56, Short.MAX_VALUE))
        );
        jPanel1Layout.setVerticalGroup(
            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel1Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jPanel5, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addGap(36, 36, 36))
        );

        jTabbedPane1.addTab("Cadastrar", jPanel1);

        jPanel7.setBorder(new javax.swing.border.LineBorder(new java.awt.Color(0, 0, 204), 2, true));

        jLabel5.setText("Matrícula:");

        btnPesquisa.setText("Pesquisar");
        btnPesquisa.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnPesquisaActionPerformed(evt);
            }
        });

        btnListar.setText("Listar");
        btnListar.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnListarActionPerformed(evt);
            }
        });

        jPanel8.setBorder(new javax.swing.border.LineBorder(new java.awt.Color(0, 0, 204), 1, true));

        tblPesquisaCons.setModel(new javax.swing.table.DefaultTableModel(
            new Object [][] {

            },
            new String [] {
                "Matrícula", "Nome", "Endereco", "cpf", "Usuario", "Fone1", "Fone2", "Nivel"
            }
        ) {
            Class[] types = new Class [] {
                java.lang.String.class, java.lang.String.class, java.lang.String.class, java.lang.String.class, java.lang.String.class, java.lang.String.class, java.lang.String.class, java.lang.String.class
            };
            boolean[] canEdit = new boolean [] {
                false, false, false, false, false, false, false, false
            };

            public Class getColumnClass(int columnIndex) {
                return types [columnIndex];
            }

            public boolean isCellEditable(int rowIndex, int columnIndex) {
                return canEdit [columnIndex];
            }
        });
        jScrollPane1.setViewportView(tblPesquisaCons);

        javax.swing.GroupLayout jPanel8Layout = new javax.swing.GroupLayout(jPanel8);
        jPanel8.setLayout(jPanel8Layout);
        jPanel8Layout.setHorizontalGroup(
            jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel8Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 610, Short.MAX_VALUE)
                .addContainerGap())
        );
        jPanel8Layout.setVerticalGroup(
            jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel8Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 158, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(20, Short.MAX_VALUE))
        );

        txtPesquisa.addKeyListener(new java.awt.event.KeyAdapter() {
            public void keyPressed(java.awt.event.KeyEvent evt) {
                txtPesquisaKeyPressed(evt);
            }
        });

        javax.swing.GroupLayout jPanel7Layout = new javax.swing.GroupLayout(jPanel7);
        jPanel7.setLayout(jPanel7Layout);
        jPanel7Layout.setHorizontalGroup(
            jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel7Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel7Layout.createSequentialGroup()
                        .addComponent(jPanel8, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                        .addContainerGap())
                    .addGroup(jPanel7Layout.createSequentialGroup()
                        .addComponent(jLabel5)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addComponent(txtPesquisa, javax.swing.GroupLayout.DEFAULT_SIZE, 183, Short.MAX_VALUE)
                        .addGap(18, 18, 18)
                        .addComponent(btnPesquisa)
                        .addGap(18, 18, 18)
                        .addComponent(btnListar, javax.swing.GroupLayout.PREFERRED_SIZE, 67, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addContainerGap(220, Short.MAX_VALUE))))
        );
        jPanel7Layout.setVerticalGroup(
            jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel7Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel5)
                    .addComponent(txtPesquisa, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(btnPesquisa)
                    .addComponent(btnListar))
                .addGap(13, 13, 13)
                .addComponent(jPanel8, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(38, Short.MAX_VALUE))
        );

        javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2);
        jPanel2.setLayout(jPanel2Layout);
        jPanel2Layout.setHorizontalGroup(
            jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel2Layout.createSequentialGroup()
                .addComponent(jPanel7, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(19, Short.MAX_VALUE))
        );
        jPanel2Layout.setVerticalGroup(
            jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel2Layout.createSequentialGroup()
                .addComponent(jPanel7, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(72, Short.MAX_VALUE))
        );

        jTabbedPane1.addTab("Consulta", jPanel2);

        jPanel9.setBorder(new javax.swing.border.LineBorder(new java.awt.Color(0, 0, 204), 2, true));

        jLabel6.setText("Matricula:");

        txtExcluirFunc.addKeyListener(new java.awt.event.KeyAdapter() {
            public void keyPressed(java.awt.event.KeyEvent evt) {
                txtExcluirFuncKeyPressed(evt);
            }
        });

        bt_exc.setText("Excluir");
        bt_exc.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                bt_excActionPerformed(evt);
            }
        });

        btnExPescuisar.setText("Pesquisar");
        btnExPescuisar.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnExPescuisarActionPerformed(evt);
            }
        });

        jPanel10.setBorder(new javax.swing.border.LineBorder(new java.awt.Color(0, 0, 204), 1, true));

        tblPesquisaExc.setModel(new javax.swing.table.DefaultTableModel(
            new Object [][] {

            },
            new String [] {
                "Matrícula", "Nome", "cpf", "Endereco", "Usuario", "Fone 1", "Fone 2", "Nivel"
            }
        ) {
            Class[] types = new Class [] {
                java.lang.String.class, java.lang.String.class, java.lang.String.class, java.lang.String.class, java.lang.String.class, java.lang.String.class, java.lang.String.class, java.lang.Object.class
            };
            boolean[] canEdit = new boolean [] {
                false, false, false, false, false, false, false, false
            };

            public Class getColumnClass(int columnIndex) {
                return types [columnIndex];
            }

            public boolean isCellEditable(int rowIndex, int columnIndex) {
                return canEdit [columnIndex];
            }
        });
        jScrollPane2.setViewportView(tblPesquisaExc);

        javax.swing.GroupLayout jPanel10Layout = new javax.swing.GroupLayout(jPanel10);
        jPanel10.setLayout(jPanel10Layout);
        jPanel10Layout.setHorizontalGroup(
            jPanel10Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel10Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jScrollPane2, javax.swing.GroupLayout.DEFAULT_SIZE, 609, Short.MAX_VALUE)
                .addContainerGap())
        );
        jPanel10Layout.setVerticalGroup(
            jPanel10Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel10Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jScrollPane2, javax.swing.GroupLayout.DEFAULT_SIZE, 246, Short.MAX_VALUE)
                .addContainerGap())
        );

        javax.swing.GroupLayout jPanel9Layout = new javax.swing.GroupLayout(jPanel9);
        jPanel9.setLayout(jPanel9Layout);
        jPanel9Layout.setHorizontalGroup(
            jPanel9Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel9Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel9Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel9Layout.createSequentialGroup()
                        .addComponent(jPanel10, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                        .addContainerGap())
                    .addGroup(jPanel9Layout.createSequentialGroup()
                        .addComponent(jLabel6)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(txtExcluirFunc, javax.swing.GroupLayout.DEFAULT_SIZE, 395, Short.MAX_VALUE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(btnExPescuisar)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(bt_exc, javax.swing.GroupLayout.PREFERRED_SIZE, 63, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addGap(41, 41, 41))))
        );
        jPanel9Layout.setVerticalGroup(
            jPanel9Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel9Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel9Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel6)
                    .addComponent(txtExcluirFunc, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(btnExPescuisar)
                    .addComponent(bt_exc))
                .addGap(11, 11, 11)
                .addComponent(jPanel10, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addContainerGap())
        );

        javax.swing.GroupLayout jPanel3Layout = new javax.swing.GroupLayout(jPanel3);
        jPanel3.setLayout(jPanel3Layout);
        jPanel3Layout.setHorizontalGroup(
            jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel3Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jPanel9, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addContainerGap())
        );
        jPanel3Layout.setVerticalGroup(
            jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel3Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jPanel9, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addContainerGap())
        );

        jTabbedPane1.addTab("Excluir", jPanel3);

        jPanel11.setBorder(new javax.swing.border.LineBorder(new java.awt.Color(0, 0, 204), 2, true));

        jLabel7.setText("Matrícula, CPF ou Nome");

        txtPesquisaAlterar.addKeyListener(new java.awt.event.KeyAdapter() {
            public void keyPressed(java.awt.event.KeyEvent evt) {
                txtPesquisaAlterarKeyPressed(evt);
            }
        });

        jPanel12.setBorder(javax.swing.BorderFactory.createBevelBorder(javax.swing.border.BevelBorder.RAISED, java.awt.Color.blue, java.awt.Color.blue, java.awt.Color.blue, java.awt.Color.blue));

        jLabel9.setText("Usuário:");

        jLabel16.setText("Fone 1:");

        jLabel17.setText("Fone 2:");

        try{
            javax.swing.text.MaskFormatter format_textField = new javax.swing.text.MaskFormatter("########");

            format_textField.setValidCharacters
            ("0123456789");
            txtFone1Alterar    = new javax.swing.JFormattedTextField(format_textField);
        }catch(Exception ex ){}

        try{
            javax.swing.text.MaskFormatter format_textField = new javax.swing.text.MaskFormatter("########");

            format_textField.setValidCharacters
            ("0123456789");
            txtFone2Alterar    = new javax.swing.JFormattedTextField(format_textField);
        }catch(Exception ex ){}

        txtEnderecoAlterar.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                txtEnderecoAlterarActionPerformed(evt);
            }
        });

        jLabel11.setText("Endereco");

        JcomboNivelAlterar.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Atendente", "Cumim", "Cuzinheiro", "Entregador", "Garcom", "Gerente" }));
        JcomboNivelAlterar.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                JcomboNivelAlterarActionPerformed(evt);
            }
        });

        jLabel14.setText("Nome:");

        jLabel8.setText("Nivel:");

        jComboBoxStatus.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "ativado", "desativado" }));
        jComboBoxStatus.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jComboBoxStatusActionPerformed(evt);
            }
        });

        jLabel19.setText("Status");

        javax.swing.GroupLayout jPanel12Layout = new javax.swing.GroupLayout(jPanel12);
        jPanel12.setLayout(jPanel12Layout);
        jPanel12Layout.setHorizontalGroup(
            jPanel12Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel12Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel12Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel12Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                        .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel12Layout.createSequentialGroup()
                            .addGroup(jPanel12Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                .addComponent(jLabel11)
                                .addComponent(jLabel9))
                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                            .addGroup(jPanel12Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                                .addComponent(txtEnderecoAlterar, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 160, Short.MAX_VALUE)
                                .addComponent(txtUsuarioAlterar, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 160, Short.MAX_VALUE)
                                .addComponent(txtNomeAlterar, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 160, Short.MAX_VALUE)))
                        .addGroup(jPanel12Layout.createSequentialGroup()
                            .addComponent(jLabel16)
                            .addGap(18, 18, 18)
                            .addComponent(txtFone1Alterar, javax.swing.GroupLayout.DEFAULT_SIZE, 160, Short.MAX_VALUE))
                        .addGroup(jPanel12Layout.createSequentialGroup()
                            .addGroup(jPanel12Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                .addComponent(jLabel17)
                                .addComponent(jLabel8)
                                .addComponent(jLabel19))
                            .addGap(18, 18, 18)
                            .addGroup(jPanel12Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                .addComponent(txtFone2Alterar, javax.swing.GroupLayout.DEFAULT_SIZE, 160, Short.MAX_VALUE)
                                .addGroup(jPanel12Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
                                    .addComponent(jComboBoxStatus, javax.swing.GroupLayout.Alignment.LEADING, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                                    .addComponent(JcomboNivelAlterar, javax.swing.GroupLayout.Alignment.LEADING, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)))))
                    .addGroup(jPanel12Layout.createSequentialGroup()
                        .addComponent(jLabel14)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 184, javax.swing.GroupLayout.PREFERRED_SIZE)))
                .addGap(110, 110, 110))
        );
        jPanel12Layout.setVerticalGroup(
            jPanel12Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel12Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel12Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel14)
                    .addComponent(txtNomeAlterar, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(18, 18, 18)
                .addGroup(jPanel12Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(txtUsuarioAlterar, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel9))
                .addGap(16, 16, 16)
                .addGroup(jPanel12Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addComponent(txtEnderecoAlterar, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel11))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(jPanel12Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jLabel16)
                    .addComponent(txtFone1Alterar, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(jPanel12Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel17)
                    .addComponent(txtFone2Alterar, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(11, 11, 11)
                .addGroup(jPanel12Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(JcomboNivelAlterar, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel8))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel12Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jComboBoxStatus, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel19))
                .addContainerGap(15, Short.MAX_VALUE))
        );

        jPanel13.setBorder(new javax.swing.border.LineBorder(new java.awt.Color(0, 0, 255), 1, true));

        btnAlterar.setText("Alterar");
        btnAlterar.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnAlterarActionPerformed(evt);
            }
        });

        bt_alt_limp.setText("Limpar");
        bt_alt_limp.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                bt_alt_limpActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout jPanel13Layout = new javax.swing.GroupLayout(jPanel13);
        jPanel13.setLayout(jPanel13Layout);
        jPanel13Layout.setHorizontalGroup(
            jPanel13Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel13Layout.createSequentialGroup()
                .addGroup(jPanel13Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel13Layout.createSequentialGroup()
                        .addGap(20, 20, 20)
                        .addComponent(btnAlterar, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel13Layout.createSequentialGroup()
                        .addContainerGap(22, Short.MAX_VALUE)
                        .addComponent(bt_alt_limp)))
                .addContainerGap())
        );
        jPanel13Layout.setVerticalGroup(
            jPanel13Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel13Layout.createSequentialGroup()
                .addGap(23, 23, 23)
                .addComponent(btnAlterar)
                .addGap(18, 18, 18)
                .addComponent(bt_alt_limp)
                .addContainerGap(32, Short.MAX_VALUE))
        );

        btnPesquisaAlterar.setText("Pesquisar");
        btnPesquisaAlterar.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnPesquisaAlterarActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout jPanel11Layout = new javax.swing.GroupLayout(jPanel11);
        jPanel11.setLayout(jPanel11Layout);
        jPanel11Layout.setHorizontalGroup(
            jPanel11Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel11Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel11Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel11Layout.createSequentialGroup()
                        .addComponent(txtPesquisaAlterar, javax.swing.GroupLayout.PREFERRED_SIZE, 216, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addComponent(btnPesquisaAlterar))
                    .addGroup(jPanel11Layout.createSequentialGroup()
                        .addComponent(jPanel12, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addComponent(jPanel13, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addComponent(jLabel7))
                .addContainerGap(17, Short.MAX_VALUE))
        );
        jPanel11Layout.setVerticalGroup(
            jPanel11Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel11Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel11Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addComponent(jPanel13, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addGroup(javax.swing.GroupLayout.Alignment.LEADING, jPanel11Layout.createSequentialGroup()
                        .addComponent(jLabel7)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(jPanel11Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(txtPesquisaAlterar, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(btnPesquisaAlterar))
                        .addGap(18, 18, 18)
                        .addComponent(jPanel12, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)))
                .addContainerGap())
        );

        javax.swing.GroupLayout jPanel4Layout = new javax.swing.GroupLayout(jPanel4);
        jPanel4.setLayout(jPanel4Layout);
        jPanel4Layout.setHorizontalGroup(
            jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel4Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jPanel11, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(188, Short.MAX_VALUE))
        );
        jPanel4Layout.setVerticalGroup(
            jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel4Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jPanel11, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addContainerGap())
        );

        jTabbedPane1.addTab("Alterar", jPanel4);

        getContentPane().add(jTabbedPane1, new org.netbeans.lib.awtextra.AbsoluteConstraints(0, 0, 680, 380));

        pack();
    }// </editor-fold>//GEN-END:initComponents

    private void btnPesquisaAlterarActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnPesquisaAlterarActionPerformed
        // TODO add your handling code here:
        if (!txtPesquisaAlterar.getText().equals("")) {

            try {
                FuncDAO fd = new FuncDAO();
                f = fd.pesquisa(txtPesquisaAlterar.getText());
                if (!f.getCpf().equals("invalido")) {
                    txtNomeAlterar.setText(f.getNome());
                    txtEnderecoAlterar.setText(f.getEndereco());
                    txtUsuarioAlterar.setText(f.getUsuario());
                    txtFone1Alterar.setText(f.getTel1());
                    txtFone2Alterar.setText(f.getTel2());
                    System.out.println(f.getStatus());
                    jComboBoxStatus.setSelectedItem(f.getStatus());
                    JcomboNivelAlterar.setSelectedItem(f.getNivel());

                } else {
                    JOptionPane.showMessageDialog(null, "Cpf ou nome de Funcionario não Cadastrado ");
                }
                //dnsakjdjas
            } catch (Exception ex) {
                ex.printStackTrace();
            }
        } else {
            JOptionPane.showMessageDialog(null, "Não há Funcionário Informado", "Erro na Alteração", JOptionPane.INFORMATION_MESSAGE);
        }

}//GEN-LAST:event_btnPesquisaAlterarActionPerformed

    private void btnAlterarActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnAlterarActionPerformed
        try {
            PessoaDAO pd = new PessoaDAO();
            FuncDAO fd = new FuncDAO();
            f.setNome(txtNomeAlterar.getText());
            f.setEndereco(txtEnderecoAlterar.getText());
            f.setUsuario(txtUsuarioAlterar.getText());
            f.setTel1(txtFone1Alterar.getText());
            f.setTel2(txtFone2Alterar.getText());
            f.setNivel(JcomboNivelAlterar.getSelectedItem().toString());
            f.setStatus(jComboBoxStatus.getSelectedItem().toString());
            if (pd.Alterar(f) & fd.alterarFuncionario(f)) {
                JOptionPane.showMessageDialog(null, "Funcionário Alterado com Sucesso ");
                txtNomeAlterar.setText(null);
                txtEnderecoAlterar.setText(null);
                txtUsuarioAlterar.setText(null);
                txtFone1Alterar.setText(null);
                txtFone2Alterar.setText(null);
                JcomboNivelAlterar.setSelectedItem(null);




            }

        } catch (Exception ex) {
            ex.printStackTrace();
            System.out.println("Exceção cadastrar " + ex);
        }

    }//GEN-LAST:event_btnAlterarActionPerformed

    private void brnCadastrarActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_brnCadastrarActionPerformed
        try {
            
            FuncDAO fd = new FuncDAO();
            PessoaDAO pd = new PessoaDAO();
            System.out.println("Antes de tudo ");
         
            //Verifica se os Campos foram preenchidos 
          
            if (!txtCpf.getText().equals("") & !txtNome.getText().equals("") & !txtEndereco.getText().equals("")
                    & !txtTel1.getText().equals("") & !txtTel2.getText().equals("") & !txtSenha.getText().equals("")
                    & !txtSenhaConfirm.getText().equals("") & !txtUsuario.getText().equals("") & !JcomboNivel.getSelectedItem().equals(null)){
                  System.out.println("Testes campos");
                  if(txtSenha.getText().equals(txtSenhaConfirm.getText())){
                //Verifica se os caracteres conrrespondentes ao cpf digitado são de um CPF válido
                if (ValidacaoCpf.calculaCPF(txtCpf.getText())) {
                  System.out.println("Teste cpf");
                    //Verifica se existe um funcionario com este Cpf
                    if (!fd.verificarFuncionario(txtCpf.getText())){
                        System.out.println("Teste Funcionario");
                        //verifica se exite uma pessoa com este Cpf
                        if (!pd.verificarPessoa(txtCpf.getText())){
                            System.out.println("Testes Pessoa");
                            f.setCpf(txtCpf.getText());
                            f.setNome(txtNome.getText());
                            f.setEndereco(txtEndereco.getText());
                            f.setTel1(txtTel1.getText());
                            f.setTel2(txtTel2.getText());
                            f.setUsuario(txtUsuario.getText());
                            f.setSenha(txtSenha.getText());
                            f.setNivel(JcomboNivel.getSelectedItem().toString());
                            f.setStatus("ativado");
                            if (pd.inserirPessoa(f) & fd.inserirFunc(f)) {
                                JOptionPane.showMessageDialog(null, "Funcionario " + f.getNome() + " Cadastrado com sucesso ");
                            } else {
                                JOptionPane.showMessageDialog(null, " Erro ao tentar cadastrar ");
                            }

                        //caso haja uma pessoa com este cpf
                        } else {
                            System.out.println("senao Pessoa");
                            if(!p.isLoad()){
                            p = pd.pesquisa(txtCpf.getText());
                            txtNome.setText(p.getNome());
                            txtNome.setEditable(false);
                            txtEndereco.setText(p.getEndereco());
                            txtEndereco.setEditable(false);
                            txtTel1.setText(p.getTel1());
                            txtTel1.setEditable(false);
                            txtTel2.setText(p.getTel2());
                            txtTel2.setEditable(false);
                            txtUsuario.setText(null);
                            txtUsuario.setEditable(true);
                            txtSenha.setText(null);
                        txtSenha.setEditable(true);
                        txtSenhaConfirm.setEditable(true);
                        txtSenhaConfirm.setText(null);
                        JcomboNivel.setSelectedItem(null);
                        p.setLoad(true);
                        JOptionPane.showMessageDialog(null," Existe uma Pessoa Cadastrada com este Cpf \n"
                                + "Para completar o cadastro preencha os campos em branco ");
                            }else{
                            f.setCpf(txtCpf.getText());
                            f.setNome(txtNome.getText());
                            f.setEndereco(txtEndereco.getText());
                            f.setTel1(txtTel1.getText());
                            f.setTel2(txtTel2.getText());
                            f.setUsuario(txtUsuario.getText());
                            f.setSenha(txtSenha.getText());
                            f.setNivel(JcomboNivel.getSelectedItem().toString());
                            f.setStatus("ativado");
                            if (fd.inserirFunc(f)) {
                                JOptionPane.showMessageDialog(null, "Funcionario " + f.getNome() + " Cadastrado com sucesso ");
                            } else {
                                JOptionPane.showMessageDialog(null, " Erro ao tentar cadastrar ");
                            }
                            }
                          }
                        //caso haja um funcionario com este cpf
                    } else {
                        System.out.println("Senao Funcionario");
                        f = fd.pesquisa(txtCpf.getText());
                        txtNome.setText(f.getNome());
                        txtNome.setEditable(false);
                        txtEndereco.setText(f.getEndereco());
                        txtEndereco.setEditable(false);
                        txtTel1.setText(f.getTel1());
                        txtTel1.setEditable(false);
                        txtTel2.setText(f.getTel2());
                        txtTel2.setEditable(false);
                        txtUsuario.setText(f.getUsuario());
                        txtUsuario.setEditable(false);
                        txtSenha.setEditable(false);
                        txtSenha.setText(null);
                        txtSenhaConfirm.setEditable(false);
                        txtSenhaConfirm.setText(null);
                        JcomboNivel.setSelectedItem(f.getNivel());
                        //testa se o Status do Funcionario está ou Desativado
                        if (f.getStatus().equals("desativado")) {
                            System.out.println("teste Status");
                            
                            JOptionPane.showMessageDialog(null, "Funcionario " + f.getNome() + " Ja está Cadastrado \n"
                                    + "Mas esta desativado para ativa-lo vá para o menu Alterar ");
                        } else {
                            System.out.println("teste Status senao");
                            JOptionPane.showMessageDialog(null, "Funcionario " + f.getNome()+ " Ja está Cadastrado ");
                        }
                    }
                } else {
                    JOptionPane.showMessageDialog(null, "Cpf Inválido Verfique se Você Digitou Corretamente ! ");
                }
            }else{
                  JOptionPane.showMessageDialog(null,"Senhas Diferentes Digite Novamente !");
                  txtSenha.setText(null);
                  txtSenhaConfirm.setText(null);
                  }
            }else{
                JOptionPane.showMessageDialog(null, "Por Favor Preencha todos os Campos ");
            }
            
        }catch (Exception ex){
            JOptionPane.showMessageDialog(null, "Exceção Lançada ao tentar Cadastrar Funcionario " + ex);
        }



    }//GEN-LAST:event_brnCadastrarActionPerformed

    private void btnLimparActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnLimparActionPerformed
        txtCpf.setText("");
        txtNome.setText("");
        txtEndereco.setText("");
        txtUsuario.setText("");
        txtSenha.setText("");
        txtSenhaConfirm.setText("");
        txtTel1.setText("");
        txtTel2.setText("");
        JcomboNivel.setSelectedItem("");

        txtCpf.setEditable(true);
        brnCadastrar.setEnabled(true);
        txtNome.setEditable(true);
        txtEndereco.setEditable(true);
        txtSenha.setEditable(true);
        txtSenhaConfirm.setEditable(true);
        txtUsuario.setEditable(true);
        txtTel1.setEditable(true);
        txtTel2.setEditable(true);
        JcomboNivel.setEnabled(true);
        JcomboNivel.setSelectedItem(null);



}//GEN-LAST:event_btnLimparActionPerformed

    private void btnPesquisaActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnPesquisaActionPerformed


        try {
            FuncDAO fd = new FuncDAO();
            DefaultTableModel modelo = new DefaultTableModel(0, 9);

            String[] linha = new String[8];
            Vector colunas = new Vector(8);

            Funcionario f = fd.pesquisa(txtPesquisa.getText());
            //Define o nome das colunas da tabela Modelo

            colunas.add("Matricula");
            colunas.add("Nome");
            colunas.add("cpf");
            colunas.add("Endereco");
            colunas.add("Usuario");
            colunas.add("Fone1");
            colunas.add("Fone2");
            colunas.add("Nivel");

            modelo.setColumnIdentifiers(colunas);


            linha[0] = f.getMatricula() + "";
            linha[1] = f.getNome();
            linha[2] = f.getCpf();
            linha[3] = f.getEndereco();
            linha[4] = f.getUsuario();
            linha[5] = f.getTel1();
            linha[6] = f.getTel2();
            linha[7] = f.getNivel();

            modelo.addRow(linha);

            tblPesquisaCons.setModel(modelo);

        } catch (Exception ex) {
            ex.printStackTrace();
            System.out.println("Exceção Pesquisar  " + ex);
        }

}//GEN-LAST:event_btnPesquisaActionPerformed

    private void btnListarActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnListarActionPerformed
        // TODO add your handling code here:
        try {
            FuncDAO fdao = new FuncDAO();
            DefaultTableModel modelo = new DefaultTableModel(0, 8);
            // List<Funcionario> listaempconv = fdao.listarFuncionarios();
            List<Funcionario> lista = null;
            try {
                lista = fdao.listarFuncionarios();
            } catch (Exception ex) {
                // Logger.getLogger(JPessoa.class.getName()).log(Level.SEVERE, null, ex);
            }



            String[] linha = new String[7];
            Vector colunas = new Vector(8);
            if (lista != null) {
                //Define o nome das colunas da tabela Modelo
                colunas.add("Matricula");
                colunas.add("Nome");
                colunas.add("cpf");
                colunas.add("Usuário");
                colunas.add("Fone 1");
                colunas.add("Fone 2");
                colunas.add("Nivel");
                modelo.setColumnIdentifiers(colunas);

                for (Funcionario f : lista) {
                    linha[0] = f.getMatricula() + "";
                    linha[1] = f.getNome();
                    linha[2] = f.getCpf();
                    linha[3] = f.getUsuario();
                    linha[4] = f.getTel1();
                    linha[5] = f.getTel2();
                    linha[6] = f.getNivel();

                    modelo.addRow(linha);
                }
                tblPesquisaCons.setModel(modelo);
            }
        } catch (Exception ex) {
            ex.printStackTrace();
            System.out.println(" exceção Listar empresa  " + ex);
        }
    }//GEN-LAST:event_btnListarActionPerformed

    private void bt_excActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_bt_excActionPerformed
        
 try {
            if (tblPesquisaExc.getRowCount() != 0) {

                FuncDAO cd = new FuncDAO();
                Funcionario f = null;
                f = cd.pesquisa(tblPesquisaExc.getValueAt(0, 1).toString());
                if(!f.getStatus().equals("desativado")) {
                int resposta = JOptionPane.showConfirmDialog(null, "Tem certeza que deseja Excluir o Funcionario " + f.getNome());

                if (resposta == 0) {
                    cd.removerFuncionario(f.getCpf());
                    JOptionPane.showMessageDialog(null, " Funcionario Excluido com Sucesso ");
                }
            }else{
                 JOptionPane.showMessageDialog(null, "Este Funcionario ja foi excluido ");
                }
            } else {
                JOptionPane.showMessageDialog(null, "Nenhum Funcionario Encotrado ");

            }
        } catch (Exception ex) {
            JOptionPane.showMessageDialog(null, "Exceção na tentativa de Exclusão " + ex.getMessage());

        }


       
}//GEN-LAST:event_bt_excActionPerformed

    private void btnExPescuisarActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnExPescuisarActionPerformed

        try {
            FuncDAO fd = new FuncDAO();
            DefaultTableModel modelo = new DefaultTableModel(0, 8);

            String[] linha = new String[8];
            Vector colunas = new Vector(8);

            Funcionario f = fd.pesquisa(txtExcluirFunc.getText());
            //Define o nome das colunas da tabela Modelo

            colunas.add("Matricula");
            colunas.add("Nome");
            colunas.add("cpf");
            colunas.add("Endereco");
            colunas.add("Usuario");
            colunas.add("Fone1");
            colunas.add("Fone2");
            colunas.add("Nivel");

            modelo.setColumnIdentifiers(colunas);


            linha[0] = f.getMatricula() + "";
            linha[1] = f.getNome();
            linha[2] = f.getCpf();
            linha[3] = f.getEndereco();
            linha[4] = f.getUsuario();
            linha[5] = f.getTel1();
            linha[6] = f.getTel2();
            linha[7] = f.getNivel();

            modelo.addRow(linha);

            tblPesquisaExc.setModel(modelo);

        } catch (Exception ex) {
            ex.printStackTrace();
            System.out.println("Exceção Excluir " + ex);
        }
}//GEN-LAST:event_btnExPescuisarActionPerformed

    private void bt_alt_limpActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_bt_alt_limpActionPerformed
        // TODO add your handling code here:
        txtNomeAlterar.setText("");
        txtEnderecoAlterar.setText("");
        txtUsuarioAlterar.setText("");
        txtFone1Alterar.setText("");
        txtFone2Alterar.setText("");

    }//GEN-LAST:event_bt_alt_limpActionPerformed

    private void txtPesquisaKeyPressed(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_txtPesquisaKeyPressed


        try {
            FuncDAO fd = new FuncDAO();
            DefaultTableModel modelo = new DefaultTableModel(0, 8);
            List<Funcionario> lista = null;
            String[] linha = new String[8];
            Vector colunas = new Vector(8);

            lista = fd.listarFuncionarios(txtPesquisa.getText());
            //Define o nome das colunas da tabela Modelo

            colunas.add("Matricula");
            colunas.add("Nome");
            colunas.add("cpf");
            colunas.add("Endereco");
            colunas.add("Usuario");
            colunas.add("Fone1");
            colunas.add("Fone2");
            colunas.add("Nivel");

            modelo.setColumnIdentifiers(colunas);

            for (Funcionario f : lista) {
                linha[0] = f.getMatricula() + "";
                linha[1] = f.getNome();
                linha[2] = f.getCpf();
                linha[3] = f.getEndereco();
                linha[4] = f.getUsuario();
                linha[5] = f.getTel1();
                linha[6] = f.getTel2();
                linha[7] = f.getNivel();

                modelo.addRow(linha);
            }
            tblPesquisaCons.setModel(modelo);

        } catch (Exception ex) {
            ex.printStackTrace();
            System.out.println("Exceção Pesquisar  " + ex);
        }

    }//GEN-LAST:event_txtPesquisaKeyPressed

    private void txtCpfActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_txtCpfActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_txtCpfActionPerformed

    private void txtEnderecoAlterarActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_txtEnderecoAlterarActionPerformed
        // TODO add your handling code here:
}//GEN-LAST:event_txtEnderecoAlterarActionPerformed

    private void JcomboNivelAlterarActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_JcomboNivelAlterarActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_JcomboNivelAlterarActionPerformed

    private void txtCpfKeyPressed(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_txtCpfKeyPressed
        try {
        } catch (Exception ex) {
        }
    }//GEN-LAST:event_txtCpfKeyPressed

    private void jButton2ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton2ActionPerformed
        try {
            PessoaDAO pd = new PessoaDAO();
            FuncDAO fd = new FuncDAO();
            f = fd.pesquisa(txtCpf.getText());
            Pessoa p = pd.pesquisa(txtCpf.getText());

            if (ValidacaoCpf.calculaCPF(txtCpf.getText())) {
                if (f.getCpf().equals(txtCpf.getText())) {
                    if (f.getStatus().equals("desativado")) {
                        
                        txtCpf.setEditable(false);
                        brnCadastrar.setEnabled(false);
                        txtNome.setText(f.getNome());
                        txtNome.setEditable(false);
                        txtEndereco.setText(f.getEndereco());
                        txtEndereco.setEditable(false);
                        txtSenha.setEditable(false);
                        txtSenhaConfirm.setEditable(false);
                        txtUsuario.setText(f.getUsuario());
                        txtUsuario.setEditable(false);
                        txtTel1.setText(f.getTel1());
                        txtTel1.setEditable(false);
                        txtTel2.setText(f.getTel2());
                        txtTel2.setEditable(false);
                        JcomboNivel.setSelectedItem(f.getNivel());
                        JcomboNivel.setEnabled(false);
                        JcomboNivel.setEditable(false);
                        JOptionPane.showMessageDialog(null, "Este CPF é de um Funcionario que esta Desativado !\n"
                                + "Para ativa-lo va para o menu Alterar !");
                        
                    } else {
                        JOptionPane.showMessageDialog(null, " Funcionário " + f.getNome() + " já cadastrado ");
                        txtCpf.setEditable(false);
                        brnCadastrar.setEnabled(false);
                        txtNome.setText(p.getNome());
                        txtNome.setEditable(false);
                        txtEndereco.setText(p.getEndereco());
                        txtEndereco.setEditable(false);
                        txtSenha.setEditable(false);
                        txtSenhaConfirm.setEditable(false);
                        txtUsuario.setEditable(false);
                        txtTel1.setText(p.getTel1());
                        txtTel1.setEditable(false);
                        txtTel2.setText(p.getTel2());
                        txtTel2.setEditable(false);
                        JcomboNivel.setSelectedItem(f.getNivel());
                        JcomboNivel.setEnabled(false);
                        JcomboNivel.setEditable(false);
                    }
                } else if (p.getCpf().equals(txtCpf.getText())) {

                    txtNome.setText(p.getNome());
                    txtNome.setEditable(false);
                    txtEndereco.setText(p.getEndereco());
                    txtEndereco.setEditable(false);
                    txtTel1.setText(p.getTel1());
                    txtTel1.setEditable(false);
                    txtTel2.setText(p.getTel2());
                    txtTel2.setEditable(false);
                    JcomboNivel.setSelectedItem(null);
                }else{
                JOptionPane.showMessageDialog(null," Pessoa Nao Cadastrada ");
                }
            } else {
                JOptionPane.showMessageDialog(null, " Número de Cpf Invalido ");
            }

        } catch (Exception ex) {
        }
    }//GEN-LAST:event_jButton2ActionPerformed

    private void JcomboNivelActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_JcomboNivelActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_JcomboNivelActionPerformed

    private void jComboBoxStatusActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jComboBoxStatusActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_jComboBoxStatusActionPerformed

    private void txtExcluirFuncKeyPressed(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_txtExcluirFuncKeyPressed
        if(evt.getKeyCode()==KeyEvent.VK_ENTER){
         try {
            FuncDAO fd = new FuncDAO();
            DefaultTableModel modelo = new DefaultTableModel(0, 8);

            String[] linha = new String[8];
            Vector colunas = new Vector(8);

            Funcionario f = fd.pesquisa(txtExcluirFunc.getText());
            //Define o nome das colunas da tabela Modelo

            colunas.add("Matricula");
            colunas.add("Nome");
            colunas.add("cpf");
            colunas.add("Endereco");
            colunas.add("Usuario");
            colunas.add("Fone1");
            colunas.add("Fone2");
            colunas.add("Nivel");

            modelo.setColumnIdentifiers(colunas);


            linha[0] = f.getMatricula() + "";
            linha[1] = f.getNome();
            linha[2] = f.getCpf();
            linha[3] = f.getEndereco();
            linha[4] = f.getUsuario();
            linha[5] = f.getTel1();
            linha[6] = f.getTel2();
            linha[7] = f.getNivel();

            modelo.addRow(linha);

            tblPesquisaExc.setModel(modelo);

        } catch (Exception ex) {
            ex.printStackTrace();
            System.out.println("Exceção Excluir " + ex);
        }
        
        
        }
    }//GEN-LAST:event_txtExcluirFuncKeyPressed

    private void txtPesquisaAlterarKeyPressed(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_txtPesquisaAlterarKeyPressed
      if (evt.getKeyCode() == KeyEvent.VK_ENTER) {
       if (!txtPesquisaAlterar.getText().equals("")) {

            try {
                FuncDAO fd = new FuncDAO();
                f = fd.pesquisa(txtPesquisaAlterar.getText());
                if (!f.getCpf().equals("invalido")) {
                    txtNomeAlterar.setText(f.getNome());
                    txtEnderecoAlterar.setText(f.getEndereco());
                    txtUsuarioAlterar.setText(f.getUsuario());
                    txtFone1Alterar.setText(f.getTel1());
                    txtFone2Alterar.setText(f.getTel2());
                    System.out.println(f.getStatus());
                    jComboBoxStatus.setSelectedItem(f.getStatus());
                    JcomboNivelAlterar.setSelectedItem(f.getNivel());

                } else {
                    JOptionPane.showMessageDialog(null, "Cpf ou nome de Funcionario não Cadastrado ");
                }
                //dnsakjdjas
            } catch (Exception ex) {
                ex.printStackTrace();
            }
        } else {
            JOptionPane.showMessageDialog(null, "Não há Funcionário Informado", "Erro na Alteração", JOptionPane.INFORMATION_MESSAGE);
        }
      
      
      
      
      
      
      }
    }//GEN-LAST:event_txtPesquisaAlterarKeyPressed

    /**
     * @param args the command line arguments
     */
    public static void main(String args[]) {
        java.awt.EventQueue.invokeLater(new Runnable() {

            public void run() {
                new Tela_Funcionario().setVisible(true);
            }
        });
    }
    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JComboBox JcomboNivel;
    private javax.swing.JComboBox JcomboNivelAlterar;
    private javax.swing.JButton brnCadastrar;
    private javax.swing.JButton bt_alt_limp;
    private javax.swing.JButton bt_exc;
    private javax.swing.JButton btnAlterar;
    private javax.swing.JButton btnExPescuisar;
    private javax.swing.JButton btnLimpar;
    private javax.swing.JButton btnListar;
    private javax.swing.JButton btnPesquisa;
    private javax.swing.JButton btnPesquisaAlterar;
    private javax.swing.JButton jButton2;
    private javax.swing.JComboBox jComboBoxStatus;
    private javax.swing.JLabel jLabel1;
    private javax.swing.JLabel jLabel10;
    private javax.swing.JLabel jLabel11;
    private javax.swing.JLabel jLabel12;
    private javax.swing.JLabel jLabel13;
    private javax.swing.JLabel jLabel14;
    private javax.swing.JLabel jLabel15;
    private javax.swing.JLabel jLabel16;
    private javax.swing.JLabel jLabel17;
    private javax.swing.JLabel jLabel18;
    private javax.swing.JLabel jLabel19;
    private javax.swing.JLabel jLabel2;
    private javax.swing.JLabel jLabel3;
    private javax.swing.JLabel jLabel4;
    private javax.swing.JLabel jLabel5;
    private javax.swing.JLabel jLabel6;
    private javax.swing.JLabel jLabel7;
    private javax.swing.JLabel jLabel8;
    private javax.swing.JLabel jLabel9;
    private javax.swing.JPanel jPanel1;
    private javax.swing.JPanel jPanel10;
    private javax.swing.JPanel jPanel11;
    private javax.swing.JPanel jPanel12;
    private javax.swing.JPanel jPanel13;
    private javax.swing.JPanel jPanel2;
    private javax.swing.JPanel jPanel3;
    private javax.swing.JPanel jPanel4;
    private javax.swing.JPanel jPanel5;
    private javax.swing.JPanel jPanel6;
    private javax.swing.JPanel jPanel7;
    private javax.swing.JPanel jPanel8;
    private javax.swing.JPanel jPanel9;
    private javax.swing.JScrollPane jScrollPane1;
    private javax.swing.JScrollPane jScrollPane2;
    private javax.swing.JTabbedPane jTabbedPane1;
    private javax.swing.JTable tblPesquisaCons;
    private javax.swing.JTable tblPesquisaExc;
    private javax.swing.JTextField txtCpf;
    private javax.swing.JTextField txtEndereco;
    private javax.swing.JTextField txtEnderecoAlterar;
    private javax.swing.JTextField txtExcluirFunc;
    private javax.swing.JTextField txtFone1Alterar;
    private javax.swing.JTextField txtFone2Alterar;
    private javax.swing.JTextField txtNome;
    private javax.swing.JTextField txtNomeAlterar;
    private javax.swing.JTextField txtPesquisa;
    private javax.swing.JTextField txtPesquisaAlterar;
    private javax.swing.JPasswordField txtSenha;
    private javax.swing.JPasswordField txtSenhaConfirm;
    private javax.swing.JTextField txtTel1;
    private javax.swing.JTextField txtTel2;
    private javax.swing.JTextField txtUsuario;
    private javax.swing.JTextField txtUsuarioAlterar;
    // End of variables declaration//GEN-END:variables


}

